﻿@model IEnumerable<Subtle.Areas.Administration.ViewModels.PostViewModel>
@{
	ViewBag.Title = "Index";
	Layout = "~/Areas/Administration/Views/Shared/_Layout.cshtml";
}
<h2>
	List of Posts</h2>
<p>
	@Html.ActionLink("Add New", "Add")
</p>
<table>
	<tr>
		<th>
		</th>
		<th>
			Title
		</th>
		<th>
			Body
		</th>
		<th>
			Tags
		</th>
		<th>
			Category
		</th>
	</tr>
	@foreach (var item in Model)
 {
		<tr>
			<td>
				@Html.ActionLink("Edit", "Edit", new { id = item.ID }) |
				@Html.ActionLink("Delete", "Delete", new { id = item.ID })
			</td>
			<td>
				@item.Title
			</td>
			<td>
				@item.Body.Substring(0, 64)
			</td>
			<td>
				@item.Tags
			</td>
			<td>
				@item.CategoryDescription
			</td>
		</tr>
 }
</table>
